//
//  BMResponse.m
//  砼车Demo
//
//  Created by apple on 16/1/7.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "BMResponse.h"

NSString *const  KBMErrorDomain = @"com.bm.error";
NSInteger const kResultOk = 1;

@implementation BMResponse

+ (NSArray *)ignoredPropertyNames
{
    return @[@"result",@"rawResult"];
}

- (NSString *)msg
{
    if ([BMUtils isEmptyString:_msg]) {
        NSInteger errorCode = _error.code;
        NSString *errorMsg = _error.description;
        if ([BMUtils isEmptyString:errorMsg]) {
            return @"未知错误";
        }else {
            switch (errorCode) {
                case 3840:
                    return @"服务器数据格式返回错误";
                    
                default:
                    return @"";
            }
        }
    }
    return _msg;
}

@end
